package com.yauchu.kegra.graph;

import org.jgrapht.graph.DefaultEdge;

public class NumberedEdge extends DefaultEdge implements Comparable<NumberedEdge>{
    private GraphNode v1;
    private GraphNode v2;
    private String label;
    
    //public NumberedEdge()
    //{}
    
    public int compareTo(NumberedEdge ne)
    {
     int thisorder= Integer.valueOf(this.label);	
     int extorder= Integer.valueOf(ne.label);
     return thisorder - extorder;
    }
    public NumberedEdge( GraphNode v1, GraphNode v2, String label)  {
        this.v1 = v1;
        this.v2 = v2;
        this.label = label;
    }

    public GraphNode getV1() {
        return v1;
    }

    public GraphNode getV2() {
        return v2;
    }

    public String toString() {
        return label;
    }
}		